#include <iostream>
#include <sys/types.h>
#include <sys/stat.h>
#include <unistd.h>
#include <fcntl.h>
#define FILENAME "fifo"
using namespace std;


int main()
{
    int r_open = open(FILENAME, O_WRONLY);
    string message;
    while (1)
    {
        cout << "client send: ";
        getline(cin, message);
        ssize_t r_write = write(r_open, message.c_str(), message.size());
    }

    close(r_open);
}


